﻿#ifndef SERVERINFOPUSHCENTER_H
#define SERVERINFOPUSHCENTER_H

#include <QMutex>
#include <QThread>

class ServerInfoPushCenter : public QThread
{
    Q_OBJECT
public:
    /**
    * 获取单例实例
    * @return 返回单例实例
    */
    static ServerInfoPushCenter* getInstance();
    /**
    * 删除单例实例
    */
    static void deleteInstance();
private:
    explicit ServerInfoPushCenter(QObject *parent = nullptr);
    ~ServerInfoPushCenter();
    static ServerInfoPushCenter* instance;
    static QMutex mutex;
signals:
    void signal_serverInfo(QString &infoStr);
private:
    bool isRun;
    uint32_t pushInterval;
protected:
    void run() override;

};

#endif // SERVERINFOPUSHCENTER_H
